﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using JMY_Models;

namespace JMY_BLL
{
    public class T_Discount_InfosBll:BaseBLL<JMY_Models.T_Discount_Infos_Model>
    {
        /// <summary>
        /// 指定需要实例化的工厂子类名称
        /// </summary>
        private const string _type = "T_Discount_InfosDal";
        /// <summary>
        /// 
        /// </summary>
        private JMY_IDAL.IT_Discount_Infos _Dal;
        /// <summary>
        /// 构造函数
        /// </summary>
        public T_Discount_InfosBll()  : base(_type)
        {
            _Dal = base.Dal as JMY_IDAL.IT_Discount_Infos;
            if (_Dal==null)
            {
                throw new NullReferenceException(_type);
            }
        }
        public List<T_Discount_Infos_Model> GetDiscount_Infor()
        {
            return _Dal.GetDiscount_Infor();
        }

        public int AddDiscount_Infor(JMY_Models.T_Discount_Infos_Model p)
        {
            return _Dal.AddDiscount_Infor(p);
        } 
        public int DelDiscount_Infor(int T_Discount_ID)
        {
            return _Dal.DelDiscount_Infor(T_Discount_ID);
        }

        public List<JMY_Models.T_Discount_Infos_Model> ShowDic(int T_Discount_ID)
        {
            return _Dal.ShowDic(T_Discount_ID);
        }
        public int UpdateDiscount_Infor(JMY_Models.T_Discount_Infos_Model p)
        {
            return _Dal.UpdateDiscount_Infor(p);
        }
    }
}
